<?php
include 'JHeader.php';
/**
 * Das Template für "Neue Liga".
 * In der css-Datei kann das Aussehen verändert werden.
 *
 * @author Timo
 */
?>
<!DOCTYPE html>
<html>
    <head>
        <title>Neue Liga</title>
        <script type="text/javascript">
        function validate()
        {
            if (document.league_form.league_name.value == '')
            {
                alert('Please enter a league name.');
                document.league_form.league_name.focus();
                return false;
            }
        }
        </script>
        <link rel="stylesheet" type="text/css" href="css/default.css" />
        <script type="text/javascript" language="JavaScript" src="js_helpfuncs/check_funcs.js"></script>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
        <div id="caption"><h1>NEUE LIGA</h1></div>
        <div id="main">
            <form name="league_form" action="Leagues/index.php" onsubmit="return validate()" method="post">                 
                <table>
                    <tr>
                        <td>Name der Liga</td>
                        <td><input type="text" name="league_name" size="25" maxlength="50" onkeyup="CheckLeagueName();" /></td>
                        <td id="check_name"></td>
                    </tr>
                    <tr>
                        <td>Kürzel</td>
                        <td><input type="text" name="shortcut" size="25" maxlength="50" onkeyup="CheckLeagueShortcut();" /></td>
                        <td id="check_shortcut">Wird automatisch generiert, wenn das Feld ohne Wert bleibt.</td>
                    </tr>
                    <tr>
                        <td>Simulation</td>
                        <td>
                            <select name="select_game" size="1">
                                <option value="rfactor" selected>rFactor</option>
                                <option value="race07">Race07</option>
                            </select>
                        </td>
                        <td id="check_game"></td>
                    </tr>
                    <tr>
                        <td><input type="submit" value="Liga erstellen"></td>
                        <td></td>
                        <td></td>
                    </tr>
                </table>
            </form>
        </div>
    </body>
</html>